package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.dto.XsOrderDto;
import com.ruoyi.system.domain.vo.XsStatisticsVo;
import com.ruoyi.system.mapper.XsOrderMapper;
import com.ruoyi.system.service.IXsStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
* 统计
*/
@Service
public class XsStatisticsServiceImpl implements IXsStatisticsService {

    @Autowired
    private XsOrderMapper xsOrderMapper;

    /**
     * 统计 收益，订单，用户信息
     * @return
     */
    @Override
    public XsStatisticsVo statistics(XsOrderDto orderDto) {
        XsStatisticsVo vo = Optional.ofNullable(xsOrderMapper.statisticsHome(orderDto)).orElse(new XsStatisticsVo());
        return vo;
    }
}




